import request from '@/utils/request'

//新增接口
export const addWcGoodsContactZone = (data = {}, params = {}) => {
  return request({
    url: 'wcGoodsContactZone',
    method: 'POST',
    data,
    params
  })
}
//修改接口
export const updataWcZoneGoods = (data = {}, params = {}) => {
  return request({
    url: 'wcZoneGoods',
    method: 'PUT',
    data,
    params
  })
}
//修改接口
export const updataWcGoodsContactZone = (data = {}, params = {}) => {
  return request({
    url: 'wcGoodsContactZone',
    method: 'PUT',
    data,
    params
  })
}
//导出接口
export const exportWcGoodsContactZone = (data = {}, params = {}) => {
  return request({
    url: 'wcGoodsContactZone/export',
    method: 'POST',
    responseType: "blob",
    data,
    params
  })
}

//查询列表接口
export const listWcZoneGoods = (data = {}, params = {}) => {
  return request({
    url: 'wcZoneGoods/list',
    method: 'GET',
    data,
    params
  })
}

//查询列表接口
export const listWcGoodsContactZone = (data = {}, params = {}) => {
  return request({
    url: 'wcGoodsContactZone/list',
    method: 'GET',
    data,
    params
  })
}

//删除接口
export function deleteWcGoodsContactZone(parmas) {
  return request({
    url: `wcGoodsContactZone/${parmas.ids}?zoneId=${parmas.zoneId}`,
    method: 'DELETE',
  });
}
//单查接口
export function findWcGoodsContactZone(id) {
  return request({
    url: `wcGoodsContactZone/${id}`,
    method: 'GET'
  })
}

// 查询专区关联商品详细列表
export function findWcGetGoodsList(id) {
  return request({
    url: `wcGoodsContactZone/getGoodsList`,
    method: 'GET'
  })
}

// 新增专区商品配置及更新数量
export function wcGoodsContactZoneAdds(data={}) {
  return request({
    url: `wcGoodsContactZone/adds`,
    method: 'POST',
	data
  })
};


// 删除专区商品配置及更新数量
export function wcGoodsContactZoneDel(params={}) {
  return request({
    url: `wcGoodsContactZone/delete`,
    method: 'GET',
	params
  })
};